package com.computergames.server.server.session;

import io.netty.channel.Channel;
import org.apache.ibatis.annotations.Delete;
import org.apache.ibatis.annotations.Insert;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Select;
import org.springframework.stereotype.Repository;

//@Mapper
public interface SessionDao {
    //@Insert("insert into session(channel, username) values(#{channel}, #{username})")
    void addSession(Channel channel, String username);

    //@Delete("delete from session where channel = #{channel}")
    void removeSession(String username);

    //@Select("select * from session where username = #{username}")
    Channel getChannel(String username);
}
